﻿using System;
using System.Diagnostics;

namespace Rhizome.Contract
{
#if !SILVERLIGHT && !WINDOWS_PHONE
    [Serializable]
#endif
    public sealed class StateNotFoundException : RhizomeException, IStateNotFoundException
    {
        public StateNotFoundException(object stateId, Exception innerException)
            : base(string.Format("State not found.  StateId: [{0}]", stateId), innerException)
        {
            StateId = stateId;
        }

        public StateNotFoundException(object stateId) : this(stateId, null)
        {
        }

        public object StateId { get; private set; }

        #region IStateNotFoundException Members

        object IStateNotFoundException.StateId
        {
            [DebuggerStepThrough]
            get { return StateId; }
        }

        #endregion
    }

    public interface IStateNotFoundException
    {
        object StateId { get; }
    }
}